﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using S.Common.Enums.User;

namespace S.Authorization.Domain.Model.User
{
    /// <summary>
    /// 用户表
    /// </summary>
    [Table("UsersModel")]
    public class UsersModel
    {
        
        [Key]
        ///主键
        public int UserId { get; set; }
        /// <summary>
        /// 员工编号
        /// </summary>
        public long UserCode { get; set; }

        /// <summary>
        /// 账号
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? UserName { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public string? UserPassword { get; set; }

        /// <summary>
        /// 昵称
        /// </summary>
        [Column(TypeName = "nvarchar(100)")]
        [MaxLength(100)]
        public string? UserNickName { get; set; }

        /// <summary>
        /// 用户性别 false-男 true-女
        /// </summary>
        public bool UserSex { get; set; }

        /// <summary>
        /// 用户真实姓名
        /// </summary>
        [Column(TypeName = "nvarchar(50)")]
        [MaxLength(50)]
        public string? UserTrueName { get; set; }

        /// <summary>
        /// 证件类型
        /// </summary>
        public UserIDTypeEnum? UserIDType { get; set; }
        /// <summary>
        /// 用户身份证
        /// </summary>
        [Column(TypeName = "nvarchar(20)")]
        [MaxLength(20)]
        public string? UserIdentityCard { get; set; }
        /// <summary>
        /// 用户联系电话
        /// </summary>
        [Column(TypeName = "nvarchar(20)")]
        [MaxLength(20)]
        public string? UserPhone { get; set; }
        /// <summary>
        /// 用户邮箱
        /// </summary>
        [Column(TypeName = "nvarchar(30)")]
        [MaxLength(30)]
        public string? UserEmail { get; set; }
        /// <summary>
        /// 毕业院校
        /// </summary>
        [Column(TypeName = "nvarchar(20)")]
        [MaxLength(20)]
        public string? UserSchool { get; set; }

        /// <summary>
        /// 用户学历
        /// </summary>
        public UserEducationEnum? UserEducation { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public int BusinessId { get; set; }
        /// <summary>
        /// 员工状态
        /// </summary>
        public StaffStateEnum StaffState { get; set; }
        /// <summary>
        /// 部门
        /// </summary>
        public int DepartmentId { get; set; }
        /// <summary>
        /// 入职日期
        /// </summary> 
        public DateTime? DateOnBoard { get; set; }
        /// <summary>
        /// 转正日期
        /// </summary>
        public DateTime? PositiveDates { get; set; }

        /// <summary>
        /// 籍贯（省）
        /// </summary>
        public int Province { get; set; }
        /// <summary>
        /// 籍贯（市）
        /// </summary>
        public int City { get; set; }
        /// <summary>
        /// 区
        /// </summary>
        public int Area { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string? Address { get; set; }
        /// <summary>
        /// 创建人
        /// </summary>
        [Column(TypeName = "nvarchar(20)")]
        [MaxLength(20)]
        public string? CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// 修改人
        /// </summary>
        [Column(TypeName = "nvarchar(20)")]
        [MaxLength(20)]
        public string? UpdateBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateDate { get; set; }

        /// <summary>
        /// 是否删除
        /// </summary>
        public bool IsDel { get; set; }
    }
   
}
